Problem: Find $\dfrac{d}{dx}\left(\cos(e^x)\right)$. Choose 1 answer: Choose 1 answer: (Choice A) A $\sin(e^x)$ (Choice B) B $\cos(e^x)$ (Choice C) C $x\cos(e^{x-1})$ (Choice D) D $-e^x\sin(e^x)$
Explanation: $\cos(e^x)$ is a composition of two, more basic, functions: $e^x$ and $\cos(x)$. In other words, suppose $u(x)=e^x$ and $v(x)=\cos(x)$, then $\cos(e^x)=v\Bigl(u(x)\Bigr)$, or $(v\circ u)(x)$. Therefore, $\dfrac{d}{dx}\left(\cos(e^x)\right)$ can be found using the chain rule : $\begin{aligned} \dfrac{d}{dx}\left[v\Bigl(u(x)\Bigr)\right]&=\dfrac{dv}{du}\cdot\dfrac{du}{dx} \\\\ &=v'\Bigl(u(x)\Bigr)\cdot u'(x) \end{aligned}$ Finding $v'\Bigl(u(x)\Bigr)$ $v(x)=\cos(x)$, and therefore $v'(x)=-\sin(x)$. Now we plug $u(x)=e^x$ into $v'$ : $\begin{aligned} v'\Bigl(u(x)\Bigr)&=v'\left(e^x\right) \\\\ &={-\sin(e^x)} \end{aligned}$ Finding $u'(x)$ $u(x)=e^x$, and therefore $u'(x)={e^x}$. Putting things together $\begin{aligned} &\phantom{=}\dfrac{d}{dx}\left(\cos(e^x)\right) \\\\ &=\dfrac{d}{dx}\left[v\Bigl(u(x)\Bigr)\right]&&\gray{\text{Let }u(x)=e^x\text{, }v(x)=\cos(x)} \\\\ &=v'\Bigl(u(x)\Bigr)\cdot u'(x)&&\gray{\text{The chain rule}} \\\\ &={-\sin(e^x)}\cdot {e^x} \\\\ &=-e^x\sin(e^x) \end{aligned}$ In conclusion, $\dfrac{d}{dx}\left(\cos(e^x)\right)=-e^x\sin(e^x)$.